|
|
|
|
|
|
|
Listing 18.3. Coding the cmdBtn_Click event. |
|
|
|
|
|
|
|
|
Private Sub cmdBtn_Click(Index As Integer)
'
' handle button selections
'
Select Case Index
Case 0 ' add
MSRDC1.Resultset.AddNew
Case 1 ' delete
MSRDC1.Resultset.Delete
Case 2 ' update
MSRDC1.UpdateRow
Case 3 ' refresh
MSRDC1.UpdateControls
Case 4 ' close
Unload Me
End Select
'
End Sub |
|
|
|
|
|
|
|
|
Listing 18.4 shows the code you need to add to the four RDC-related events. Note that all four of these routines use a PostMsg subroutine and that the Validate event calls a ShowAction function. You build these routines in the next step of the project. |
|
|
|
|
|
|
|
|
Listing 18.4. Coding the events of the RDC. |
|
|
|
|
|
|
|
|
Private Sub MSRDC1_Error(ByVal Number As Long, Description As String, ByVal
Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal
HelpContext As Long, CancelDisplay As Boolean)
'
PostMsg "MSRDC1_Error - Number=" & CStr(Number) & ", Description = " &
Description & ", Scode = " & CStr(Scode) & ", Source = " & Source & ",
HelpFile = " & HelpFile & ", HelpContext = " & CStr(HelpContext) & ",
CancelDisplay = " & CStr(CancelDisplay)
'
End Sub
Private Sub MSRDC1_QueryCompleted()
'
PostMsg "MSRDC1_QueryCompleted"
'
End Sub
Private Sub MSRDC1_Reposition()
'
PostMsg "MSRDC1_Reposition"
'
End Sub
Private Sub MSRDC1_Validate(Action As Integer, Reserved As Integer)
' |
|
|
|
|
|